Page({
    data: {
        info: null,
    },
    onLoad: function(options) {
        this.getDetail(options.order_id)
    },
    /**获取订单详情 */
    getDetail(order_id) {
        this.request({
            url: '/supplier/order/detail?order_id=' + order_id,
        }, res => {
            //计算合计数量
            res.data.totalSum = res.data.order_product.reduce((total, item) => {
                return total + item.product_number
            }, 0)
            this.setData({ info: res.data })
        })
    },
})